package org.bocs.config;

import jakarta.annotation.Resource;
import org.bocs.interceptor.InterceptorValidToken;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class InterceptorConfig implements WebMvcConfigurer {

    @Resource
    private InterceptorValidToken interceptorValidToken;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(interceptorValidToken)
                .addPathPatterns()
                .excludePathPatterns("/user/**", "/love-snow/**");
    }
}
